﻿<html>
<head>
    <title>动火检查表</title>
    <script src="~/Bussiness/js/base/jquery.min.js"></script>

    <style>
        body {
            font-size:20px;
        }
     

        .mytable {
            border-top: 1px solid #999;
            border-left: 1px solid #999;
            border-spacing: 0;
            line-height: 30px;
            font-size:19px;
            table-layout: fixed;
        }

            .mytable td {
                border-bottom: 1px solid #999;
                border-right: 1px solid #999;
                overflow-wrap: break-word;
                word-wrap: break-word;
            }
    </style>
</head>
<body style="background-color:white;width:100%;">
    <div style="padding-left: 0px;">
        <form>
            <h1 style="text-align:center;">临时动火现场作业检查表</h1>
            <h5 style="margin-top: 40px;">动火单号：<span id="TicketNo"></span></h5>
            <div style="float:right;margin-right:20px;">
                <label class="checkbox-inline">
                    <input type="checkbox" id="level_1">一级动火
                </label>
                <label class="checkbox-inline">
                    <input type="checkbox" id="level_2">二级动火
                </label>
                <label class="checkbox-inline">
                    <input type="checkbox" id="level_3">三级动火
                </label>
            </div>
            <table class="mytable" style="width:980px;">
                <tr>
                    <td style="width: 20%; text-align: center;">动火内容</td>
                    <td id="Content" style="text-align: center;">
                    </td>
                </tr>
                <tr>
                    <td style="text-align:center;">动火周期</td>
                    <td id="Content" style="text-align:center;">
                        <span id="ApproveStartTime"></span>至<span id="ApproveEndTime"></span>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        &nbsp;&nbsp;临时动火作业类型<br />

                        <div style="width:20%; float:left;margin-left:30px;">
                            <label>
                                <input type="checkbox" name="Type" id="type_1" />
                                <span>焊接</span>
                            </label>
                        </div>
                        <div style="width: 20%; float: left;">
                            <label>
                                <input type="checkbox" name="Type" id="type_2" />
                                <span>气割</span>
                            </label>
                        </div>
                        <div style="width: 20%; float: left;">
                            <label>
                                <input type="checkbox" name="Type" id="type_3" />
                                <span>切削</span>
                            </label>
                        </div>
                        <div style="width: 20%; float: left;">
                            <label>
                                <input type="checkbox" name="Type" id="type_4" />
                                <span>其他</span>
                            </label>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="padding-top:20px;">
                        &nbsp;&nbsp;现场动火检查情况<br />
                        <p>
                            &nbsp;&nbsp;1.现场临时动火作业是否办理审批，并在审批范围内：
                            <label>
                                <input type="checkbox" />
                                <span>是</span>
                            </label>

                            <label>
                                <input type="checkbox" />
                                <span>否</span>
                            </label>
                        </p>
                        <p>
                            &nbsp;&nbsp;2.临时动火作业人是否与审批时相符，并持证上岗：
                            <label>
                                <input type="checkbox" />
                                <span>是</span>
                            </label>

                            <label>
                                <input type="checkbox" />
                                <span>否</span>
                            </label>
                        </p>
                        <p>
                            &nbsp;&nbsp;3.动火区域周围易燃物是否已清除：
                            <label>
                                <input type="checkbox" />
                                <span>是</span>
                            </label>

                            <label>
                                <input type="checkbox" />
                                <span>否</span>
                            </label>
                        </p>
                        <p>
                            &nbsp;&nbsp;4.现场是否已配备合适有效的灭火器材：
                            <label>
                                <input type="checkbox" />
                                <span>是</span>
                            </label>

                            <label>
                                <input type="checkbox" />
                                <span>否</span>
                            </label>
                        </p>
                        <p>
                            &nbsp;&nbsp;5.施工单位动火监护人是否已到位：
                            <label>
                                <input type="checkbox" />
                                <span>是</span>
                            </label>

                            <label>
                                <input type="checkbox" />
                                <span>否</span>
                            </label>
                        </p>
                        <p>
                            &nbsp;&nbsp;6.其他问题：
                            <label>
                                <input type="text" style="border:none;border-bottom:1px solid grey;" />
                            </label>。
                        </p>
                        <p> &nbsp; </p>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="padding-top:20px;">
                        &nbsp;&nbsp;第 <label><input type="text" style="border:none;border-bottom:1px solid grey;width:40px; " /></label>天临时动火作业完成确认：<br />
                        <p>
                            &nbsp;&nbsp;1.当日动火完成时间<label><input type="text" style="border:none;border-bottom:1px solid grey;width:40px;" /></label>月<label><input type="text" style="border: none; border-bottom: 1px solid grey; width: 40px;" /></label>日
                            <label><input type="text" style="border: none; border-bottom: 1px solid grey; width: 40px;" /></label>时<label><input type="text" style="border: none; border-bottom: 1px solid grey; width: 40px;" /></label>分;

                        </p>
                        <p>
                            &nbsp;&nbsp;2.动火作业点周围无火星或热量蔓延;

                        </p>
                        <p>
                            &nbsp;&nbsp;3.动火作业设备按要求收摆；
                        </p>
                        <p>
                            &nbsp;&nbsp;4.其他 <label><input type="text" style="border:none;border-bottom:1px solid grey;width:90px;" /></label>；
                        </p>
                        <p>
                            &nbsp;&nbsp;经确认，当日动火作业已结束。
                        </p>


                        <p style="text-align:right;">
                            现场监护人签名： &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
                        </p>
                        <p style="text-align:right;">
                            消防队监护人签名： &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
                        </p>
                        <p> &nbsp; </p>
                    </td>
                </tr>
            </table>
        </form>
    </div>
    <script>

        window.onload = function () {
            //loadqrcode();
            loadticketinfo();
        };


        function loadqrcode() {

        }

        function loadticketinfo() {
            var ticketid = '@(Request.QueryString["TicketId"].IsEmpty() ? "" : Request.QueryString["TicketId"])';
            $.ajax({
                type: "post",
                url: '../Construction/GetFireOperateTicketDetail',
                data: { 'TicketId': ticketid },
                success: function (datas) {
                    if (datas != null) {
                        //编号
                        $("#TicketNo").html(datas.Data.TicketNo);
                        $("#TicketNo2").html(datas.Data.TicketNo);
                        //动火项目
                        var operatetype = datas.Data.OperateTypeId;
                        if (operatetype != null && operatetype != "") {
                            var operatelist = operatetype.split(',');
                            for (var i = 0; i < operatelist.length; i++) {
                                $("#type_" + (operatelist[i])).attr("checked", "checked");
                            }
                        }
                        // $("#Type_" + datas.Data.IsOutDoorValue).attr("checked", "checked");
                        var isoutdoor = datas.Data.IsOutdoor.split(',');
                        for (var i = 0; i < isoutdoor.length; i++) {
                            $("#Type_" + isoutdoor[i]).prop("checked", "checked")
                        }
                        $("#factory_" + datas.Data.FactoryAreaId).attr("checked", "checked");

                        $("#level_" + datas.Data.LevelId).attr("checked", "checked");
                        //动火日期
                        $("#OperateDate").html(ParseDate(datas.Data.OperateDate));
                        $("#Department").html(datas.Data.DepartmentName);
                        $("#Content").html(datas.Data.Content);
                        $("#Company").html(datas.Data.CompanyName);
                        $("#CompanySupervisorContact").html(datas.Data.Phone);
                        $("#Location").html(datas.Data.Location);
                        $("#FireLevel").html(datas.Data.LevelName);
                        $("#OperateStartTime").html(ParseDate(datas.Data.OperateStartTime));
                        $("#OperateEndTime").html(ParseDate(datas.Data.OperateEndTime));
                        $("#ApproveStartTime").html(ParseDateTime(datas.Data.ApproveStartTime));
                        $("#ApproveEndTime").html(ParseDateTime(datas.Data.ApproveEndTime));
                        //$("#OperateDate2").html(ParseDate(datas.Data.OperateDate));
                        $("#OperateCompleteTime").html("&nbsp;");
                        $("#Supervisor").html(datas.Data.FiremanName);
                        $("#SupervisorContact").html(datas.Data.FiremanNamePhone);
                        $("#ProjectName").html(datas.Data.ProjectName);
                    }
                }, error: function (err) { }
            })
        }

        function ParseDate(date) {
            var str = date.replace("/Date(", "").replace(")/", "");
            var datetime = parseInt(str);
            var time = new Date(datetime);
            var year = time.getFullYear();
            var month = time.getMonth() + 1;
            var day = time.getDate();
            return year + "年" + month + "月" + day + "日";
        }

        function ParseDateTime(date) {
            var str = date.replace("/Date(", "").replace(")/", "");
            var datetime = parseInt(str);
            var time = new Date(datetime);
            var year = time.getFullYear();
            var month = time.getMonth() + 1;
            var day = time.getDate();
            var hour = time.getHours();
            var minute = time.getMinutes();
            return year + "年" + month + "月" + day + "日 " + hour + "时" + minute+"分";
        }
    </script>
</body>
</html>